<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #box {
        width: 300px;
        height: 300px;
        border: solid;
        position: fixed;
        left: 10%;
        top: 30%;
      }
    </style>
  </head>
  <body>
    <div id="box"></div>
    <script>
      const box = document.getElementById("box");
      console.log(box.getBoundingClientRect());
    </script>
  </body>
</html>
